<template>
  <div class="container">
    <iframe :src="`./contract.html#/contract?token=${userToken}`" class="iframe" @load="afterLoad"></iframe>
  </div>
</template>
<script>
import { mapState } from 'vuex'
import { Indicator } from 'mint-ui'
export default {
  computed: {
    ...mapState({
      userToken: ({ auth }) => auth.userToken
    })
  },
  beforeCreate () {
    Indicator.open()
    setTimeout(() => {
      Indicator.close()
    }, 30 * 1000)
  },
  methods: {
    afterLoad () {
      Indicator.close()
    }
  }
}
</script>
<style scoped>
.container {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 51px;
}
.iframe {
  width: 100%;
  height: 100%;
}
</style>
